import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import axios from "axios";

//第一步：设置axios发送请求的时候，我们会添加一个/api
axios.defaults.baseURL = '/api';
//第二步：让每个vue实例都有一个属性，属性是$axios
Vue.prototype.$axios = axios;
//http://localhost:8000/student
//转换成如下
//http://localhost:8080/api/student --> http://localhost:9000/api/student

Vue.config.productionTip = false
Vue.use(ElementUI);//表示使用引入的ui
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
